package com.groovy.base


class GroovyException {
    static void main(String[] args) {
        try {
            def arr = new int[3];
            arr[5] = 5;
        } catch(Exception ex) {
            System.out.println(ex.getMessage())
            ex.printStackTrace()

            println("Catching the exception");
            println(ex.getStackTrace())
        }

        println("Let's move on after the exception");
    }
}
